<?php include_once('databaseAccess.php');$categories = array();for ($i = 0; $i < count( $categoryArray ); $i++){	$tmpArray = array();	$tmpArray['catname'] = htmlentities($categoryArray[$i]['catname']);	$tmpArray['catmenu'] = htmlentities($categoryArray[$i]['catmenu']);	$categories[$i] = $tmpArray;}$result = json_encode($categories);echo $result;	?>